package org.dochandler.test.populator;

import org.dochandler.service.domain.constants.Constants;
import org.dochandler.service.domain.mission.Coordinate;
import org.dochandler.service.domain.mission.GlobalPosition;
import org.esfinge.guardian.annotation.config.PopulatorClass;
import org.esfinge.guardian.context.AuthorizationContext;
import org.esfinge.guardian.populator.Populator;

@PopulatorClass(OfficerGlobalPosition.class)
public class OfficerGlobalPosition implements Populator {

	@Override
	public void populate(AuthorizationContext context) {
		Coordinate latitude = new Coordinate(5d, 5d, 5d);
		Coordinate longitude = new Coordinate(5d, 5d, 5d);
		
		GlobalPosition gp = new GlobalPosition(latitude, longitude);
		
		context.getSubject().put(Constants.GP.val(), gp);
	}

}